home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2007 September / PCWSEP07.iso / Software / Linux / Linux Mint 3.0 Light / LinuxMint-3.0-Light.iso / casper / filesystem.squashfs / etc / init.d / reboot < prev    next >
Encoding:
Text File  |  2006-10-06  |  692 b   |  40 lines

  1. #! /bin/sh
  2. ### BEGIN INIT INFO
  3. # Provides:          reboot
  4. # Required-Start:    umountroot $network
  5. # Required-Stop:
  6. # Should-Start:      lvm raid2
  7. # Default-Start:     6
  8. # Default-Stop:
  9. # Short-Description: Execute the reboot command.
  10. # Description:
  11. ### END INIT INFO
  12.  
  13. PATH=/usr/sbin:/usr/bin:/sbin:/bin
  14.  
  15. . /lib/lsb/init-functions
  16.  
  17. do_stop () {
  18.     # Message should end with a newline since kFreeBSD may
  19.     # print more stuff (see #323749)
  20.     log_action_msg "Will now restart"
  21.     reboot -d -f -i
  22. }
  23.  
  24. case "$1" in
  25.   start)
  26.     # No-op
  27.     ;;
  28.   restart|reload|force-reload)
  29.     echo "Error: argument '$1' not supported" >&2
  30.     exit 3
  31.     ;;
  32.   stop)
  33.     do_stop
  34.     ;;
  35.   *)
  36.     echo "Usage: $0 start|stop" >&2
  37.     exit 3
  38.     ;;
  39. esac
  40.